1. Field of the Invention
The present invention relates to an apparatus for encoding an image data signal such as a television signal or the like and, more particularly, to an encoding apparatus for encoding the image signal by use of a characteristic of the image signal.
2. Related Background Art
For example, a digital VTR or the like is known as a practical apparatus of a prediction encoding system which has conventionally been known. In such a kind of apparatus, to record an image signal or the like having a large amount of information onto a recording medium such as a magnetic tape or the like, the recording is performed by compressing the transmission band of the image data using the correlation of the image data.
On the other hand, in the ordinary magnetic recording apparatus, it is difficult to record and reproduce the very low frequency component or DC component. This point will now be described in detail hereinbelow on the basis of the recording/reproducing principles of a digital VTR.
Recording onto and reproduction from a magnetic tape are performed through a few magnetic heads attached to a rotary cylinder. However, the magnetic head which is ordinarily used performs the recording by converting the time-dependent amount of change (differentiated value) of the magnetic flux into a voltage, or executes the reproduction by reversely converting the voltage into time-dependent amount of change the magnetic flux. Thus, the signal of the DC component or low frequency component is hardly reproduced. Moreover, since the magnetic head is always rotating at a high speed, the supply of the recording signal to the magnetic head and the reception of the reproduced signal from the magnetic head are executed through a rotary transformer or the like attached to the rotary cylinder. The rotary transformer also has the characteristic that the signal of the DC component or low frequency component can hardly be transmitted, similarly to the magnetic head, so that the DC component of the signal is not transmitted.
Therefore, the band compressed image data is not directly recorded but is recorded and reproduced using an interleave NRZI modulating system in which the image data is scrambled using a pseudorandom pattern and the DC component is suppressed, or the like. However, in this case as well, since a small amount of DC component is included in the scrambled image data, in the transmitting system such as the foregoing magnetic head, rotary transformer, or the like in which the DC component cannot be transmitted, a detection error frequently occurs when reproducing the recording pattern of the DC component or low frequency component. Such an increase in error rate results in an inconvenience of deterioration in image quality.
On the other hand, a method whereby the recording is performed after the modulation was performed using various kinds of DC-free recording modulating system is also known. However, for example, in the converting system such as 8-10 block encoding system having no DC component or the like, the redundancy increases and the transmission bit rate rises, so that there is a drawback that high density recording is difficult to achieve. Further, there is also a drawback that to realize such a modulating system, complicated processes are needed and the amount of hardware also increases.
To solve the foregoing problems, the assignee of the present invention has already proposed a prediction encoder in which the CDS (Codeword Digital Sum) of a small value is assigned to the "representation differential value" whose appearance frequency is high, thereby enabling the DSV (Digital Sum Value) of the whole (modulation signal) to be suppressed.
This prediction encoder will now be described hereinbelow with reference to the drawings.
FIG. 1 is a circuit constitutional diagram of the foregoing prediction encoder. In the diagram, reference numeral 11 denotes a subtracter for subtracting a prediction value signal P from an input image signal D.sub.i and generating a prediction error signal E; 12 is a quantizer for receiving the prediction error signal E and obtaining an output data signal D.sub.o (e.g., four bits), which will be explained hereinlater; 13 a representation value setting device having the characteristic opposite to that of the quantizer 12; 14 an adder for adding an output signal from a predictor 15 to a representation value signal R and feeding back the resultant value to the input side of the predictor 15, thereby executing the integrating function; and 16 a local decoder, consisting of the representation value setting device 13, adder 14, and predictor 15, and for generating the prediction value signal P.
The input/output characteristics of the quantizer 12 will now be explained with reference to the table of FIG. 3. Namely, FIG. 3 shows the relation between the level of the prediction error signal E and the bit constitution of the output data signal D.sub.o.
In the table of FIG. 3, CDS represents the sum of the respective bits in a single code when the level "1" in each bit of the bit pattern in the output data signal D.sub.o is set to "+1" and the level "0" is set to "-1". Therefore, the CDS becomes zero when the sum of the number of "1" is equal to the sum of the number of "0".
With respect to the prediction error signal E, as shown in FIG. 2, the statistical phenomenon that a large frequency distribution exists near "0" on the basis of the correlation of the image data is known. Therefore, in the prediction encoder of the present invention, a code is assigned to the range where the value of the prediction error signal E is small so that the absolute value of the CDS becomes small; on the contrary, a code is assigned to the range where the value of the prediction error signal E is large so that the absolute value of the CDS becomes large.
On the other hand, the prediction error signal E is symmetrically distributed around "0" as a center. Therefore, as shown in the table of FIG. 3, with regard to the bit pattern in the output data signal D.sub.o, the bit patterns of the prediction error signals having the same absolute value are invertedly arranged. Such an inverted arrangement of the bit patterns will be further described in detail hereinbelow.
For example, when the prediction error is "+3", the output bit pattern is "1101". When the prediction error is "-3", the arrangements of the upper and lower bits are reversed to obtain "1011". At the same time, for "0010" corresponding to the prediction error of "+6", "0100" is set in the case of the prediction error of "-6". However, "1111" and "0000" are assigned to "+7" and "-7" as the maximum values of the prediction error in this example, respectively. On the other hand, when the prediction error is zero, in addition to "0110", "1001" can be also assigned.
In this manner, by assigning the bit pattern in which the absolute value of the CDS is small to the portion near E=O where the appearance frequency of the prediction error signal E is high, the output data signal D.sub.o having less DC component is obtained.
However, although the low frequency component can be suppressed by forming an encoding signal in which the DSV is suppressed by paying an attention to the appearance frequency of the prediction errors in the foregoing prediction encoder, in order to process an image signal having a high sampling rate such as, e.g., a high definition television signal or the like, higher-efficiency encoding must be accomplished to further compress the integrated transmission band or the low frequency component must be more effectively suppressed to reduce the transmission error rate.
In addition, hitherto, a block encoding using an orthogonal transformation has been known as one of image processing means of the television signal. This encoding relates to a method whereby the whole transmission amount is reduced by transmitting each transforming coefficient after the orthogonal transformation by the transmission amount proportional to its standard deviation.
In the case of digitally transmitting each transforming coefficient, it is digitized and converted into a digital value. However, at this time, the digitization level number of each transforming coefficient is determined so as to assign a value proportional to the standard deviation of the transforming coefficient. The number of bits by which the level number can be expressed as a code is assigned for every transforming coefficient and each transforming coefficient is independently encoded and transmitted.
However, in the foregoing orthogonal transformation encoding, when the number of dividing levels of each transforming coefficient is not 2 N (N being some positive integer), codes which are not effectively used exist among all of the codes which can be expressed by the number of bits assigned to each transforming coefficient and these codes have the redundancy. On the other hand, in the case where an image signal having a high sampling rate such as, e.g., a high definition television signal or the like is recorded by a rotary magnetic recording and reproducing apparatus, it is demanded that the redundancy of the codes be reduced to be as small as possible the DC component be suppressed, and the integrated bit rate be reduced.